package com.abvnet.project.water.project.service;

import com.abvnet.common.utils.text.Convert;
import com.abvnet.project.water.project.domain.ProjectCustomerContact;
import com.abvnet.project.water.project.mapper.ProjectCustomerContactMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 客户联系 服务层实现
 * 
 * @author duj
 * @date 2019-08-17
 */
@Service
public class ProjectCustomerContactServiceImpl implements IProjectCustomerContactService {
	@Autowired
	private ProjectCustomerContactMapper projectCustomerContactMapper;

	/**
     * 查询客户联系信息
     * 
     * @param contactId 客户联系ID
     * @return 客户联系信息
     */
    @Override
	public ProjectCustomerContact selectProjectCustomerContactById(Long contactId) {
	    return projectCustomerContactMapper.selectProjectCustomerContactById(contactId);
	}
	
	/**
     * 查询客户联系列表
     * 
     * @param projectCustomerContact 客户联系信息
     * @return 客户联系集合
     */
	@Override
	public List<ProjectCustomerContact> selectProjectCustomerContactList(ProjectCustomerContact projectCustomerContact) {
	    return projectCustomerContactMapper.selectProjectCustomerContactList(projectCustomerContact);
	}
	
    /**
     * 新增客户联系
     * 
     * @param projectCustomerContact 客户联系信息
     * @return 结果
     */
	@Override
	public int insertProjectCustomerContact(ProjectCustomerContact projectCustomerContact) {
	    return projectCustomerContactMapper.insertProjectCustomerContact(projectCustomerContact);
	}
	
	/**
     * 修改客户联系
     * 
     * @param projectCustomerContact 客户联系信息
     * @return 结果
     */
	@Override
	public int updateProjectCustomerContact(ProjectCustomerContact projectCustomerContact) {
	    return projectCustomerContactMapper.updateProjectCustomerContact(projectCustomerContact);
	}

	/**
     * 删除客户联系对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteProjectCustomerContactByIds(String ids) {
		return projectCustomerContactMapper.deleteProjectCustomerContactByIds(Convert.toStrArray(ids));
	}
	
}